import http from "@/api/http";

//获取上传的数据
export const getClothesList = (params: any) => {
  return http.post(`/clothes/list`, params);
};
//获取大类
export const postCategory = (params: any) => {
  return http.post(`/categories/groupWithSubPage`, params);
};
//编辑大类
export const putCategory = (params: any) => {
  return http.put(`/categories/edit/name`, params);
};
//编辑小类
export const putCategoryType = (params: any) => {
  return http.put(`/categories/type/edit`, params);
};
//新增大类
export const postCategoryAdd = (params: any) => {
  return http.post(`/categories/add`, params);
};
//新增小类
export const postCategoryAddType = (params: any) => {
  return http.post(`/categories/add/type`, params);
};
//删除小分类
export const deleteCategoryType = (id: string) => {
  return http.delete(`/categories/type/delete/${id}`);
};
//删除大类
export const deleteCategoryGroup = (id: string) => {
  return http.delete(`/categories/delete/${id}`);
};
//分页获取某分类下衣服
export const postClothes = (params: any) => {
  return http.post(`/categories/clothes`, params);
};

//获取导出
export const getCategoryExport = () => {
  return http.get(`/categories/export`, { responseType: "blob" });
};
